home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 January: Mac OS SDK / Dev.CD Jan 96 SDK / Dev.CD Jan 96 SDK1.toast / Development Kits (Disc 1) / AOCE / Development Tools / Sample Code / Digital Signatures / Digital Signature Demo / Source ƒ / ErrorMessage.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-11  |  1.1 KB  |  61 lines  |  [TEXT/KAHL]

  1. /*
  2.  * ErrorMessage.c
  3.  * Copyright © 1993 Apple Computer Inc.
  4.  * All Rights Reserved
  5.  *
  6.  * ErrorMessage.c is used for debugging. In a real application,
  7.  * we would get strings from a resource file.
  8.  *
  9.  * Message.c displays a message string in an Alert.
  10.  */
  11. #include <Global.h>
  12. #include <Constants.h>
  13. #include <TBUtilities.h>
  14. #include <CError.h>
  15. #include <CApplication.h>
  16. #include <Packages.h>
  17.  
  18. extern CError            *gError;
  19. extern CApplication        *gApplication;
  20.  
  21. void                        ErrorMessage(
  22.         OSErr                    macErr,
  23.         const StringPtr            textString
  24.     );
  25. void                        Message(
  26.         const StringPtr            textString
  27.     );
  28. /*
  29.  * ErrorMessage
  30.  */
  31. void
  32. ErrorMessage(
  33.         OSErr                    macErr,
  34.         const StringPtr            textString
  35.     )
  36. {
  37.         Str15                errorNumber;
  38.     
  39.         NumToString(macErr, errorNumber);
  40.          ParamText(textString, errorNumber, "\p", "\p");
  41.         PositionDialog('ALRT', ALRT_Exception);
  42.         InitCursor();
  43.         StopAlert(ALRT_Exception, NULL);
  44. }
  45.  
  46. /*
  47.  * Just a Message
  48.  */
  49. void
  50. Message(
  51.         const StringPtr            textString
  52.     )
  53. {
  54.          ParamText(textString, "\p", "\p", "\p");
  55.         PositionDialog('ALRT', ALRTgeneral);
  56.         InitCursor();
  57.         Alert(ALRTgeneral, NULL);
  58. }
  59.  
  60.  
  61.